package moodish.dummy;


import static org.junit.Assert.*;

import java.net.Socket;


import moodish.comm.ServerSideMessage.Type;

import org.junit.BeforeClass;
import org.junit.Test;

public class ServerCommDummyTest {

	private static ServerCommDummy server ;
	//private static ClientCommDummy client;
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	server =  new ServerCommDummy();
	
	
	}
	
	
	@Test
	public void test(){
			

		ServerSidesMessage msg=  new ServerSidesMessage("payload", "from", Type.FRIENDSHIP);
        DealClient deal = new DealClient(new Socket(), server);
		
		
		server.addMessage(msg);
		
		assertEquals(true,server.hasNextMessage());
		assertEquals(msg,server.getNextMessage());
		
		assertNotNull(deal);

		
		
	}

	
}
